package com.qwz.example;

public class Client {

    public static void main(String[] args) {
        Handler generalManager = new GeneralManager();
        Handler depManager = new DepManager();
        Handler projectManager = new ProjectManager();

        projectManager.setSuccessor(depManager);
        depManager.setSuccessor(generalManager);

        String lx = projectManager.handleFeeRequest("lx", 400);
        System.out.println(lx);
        String wx = projectManager.handleFeeRequest("wx", 400);
        System.out.println(wx);

        String lx1 = projectManager.handleFeeRequest("lx", 800);
        System.out.println(lx1);
        String wx1 = projectManager.handleFeeRequest("wx", 800);
        System.out.println(wx1);

        String lx2 = projectManager.handleFeeRequest("lx", 2100);
        System.out.println(lx2);
        String wx2 = projectManager.handleFeeRequest("wx", 2400);
        System.out.println(wx2);
    }
}
